#ifndef MATERIAL_H_
#define MATERIAL_H_

class Material{
	float ambient[4];
	float diffuse[4];
	float specular[4];
	float emission[4];
	float shininess[1];

public:
	Material(float ar, float ag, float ab, float aa, float dr, float dg, float db, float da, 
			 float sr, float sg, float sb, float sa, float er, float eg, float eb, float ea,
			 float value) {
		setAmbient(ar, ag, ab, aa);
		setDiffuse(dr, dg, db, da);
		setSpecular(sr, sg, sb, sa);
		setEmission(er, eg, eb, ea);
		setShininess(value);
	};

	void setAmbient(float r,float g, float b, float a) {
		this->ambient[0]=r;
		this->ambient[1]=g;
		this->ambient[2]=b;
		this->ambient[3]=a;
	};

	void setDiffuse(float r,float g, float b, float a) {
		this->diffuse[0]=r;
		this->diffuse[1]=g;
		this->diffuse[2]=b;
		this->diffuse[3]=a;
	};

	void setSpecular(float r,float g, float b, float a) {
		this->specular[0]=r;
		this->specular[1]=g;
		this->specular[2]=b;
		this->specular[3]=a;
	};

	void setEmission(float r,float g, float b, float a) {
		this->emission[0]=r;
		this->emission[1]=g;
		this->emission[2]=b;
		this->emission[3]=a;
	};

	void setShininess(float value) {
		this->shininess[0]=value;
	};

	/*void useMaterial() {
		glMaterialfv(GL_FRONT,GL_AMBIENT,&ambient[0]);
		glMaterialfv(GL_FRONT,GL_DIFFUSE,&diffuse[0]);
		glMaterialfv(GL_FRONT,GL_SPECULAR,&specular[0]);
		glMaterialfv(GL_FRONT,GL_SHININESS,&shininess[0]);
		glMaterialfv(GL_FRONT,GL_EMISSION,&emission[0]);
	};*/
};
#endif